Telegram Group & Telegram Channel
Превращаем текст в речь

На Python есть классная библиотека gTTS (Google Text-to-Speech), которая взаимодействует с Google Translate's text-to-speech API и позволяет делать из текста аудиофайлы. Пакет как всегда устанавливается через pip.

При создании экземпляра класса gTTS мы передаем исходный текст первым аргументом. Также можно передать опциональный аргумент, отвечающий за язык, который по умолчанию является английским.

Сохранить полученный результат можно с помощью метода save, в который передаем название файла.

#gtts



tg-me.com/python_academy/966
Create:
Last Update:

Превращаем текст в речь

На Python есть классная библиотека gTTS (Google Text-to-Speech), которая взаимодействует с Google Translate's text-to-speech API и позволяет делать из текста аудиофайлы. Пакет как всегда устанавливается через pip.

При создании экземпляра класса gTTS мы передаем исходный текст первым аргументом. Также можно передать опциональный аргумент, отвечающий за язык, который по умолчанию является английским.

Сохранить полученный результат можно с помощью метода save, в который передаем название файла.

#gtts

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/966

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

The S&P 500 slumped 1.8% on Monday and Tuesday, thanks to China Evergrande, the Chinese property company that looks like it is ready to default on its more-than $300 billion in debt. Cries of the next Lehman Brothers—or maybe the next Silverado?—echoed through the canyons of Wall Street as investors prepared for the worst.

China’s stock markets are some of the largest in the world, with total market capitalization reaching RMB 79 trillion (US$12.2 trillion) in 2020. China’s stock markets are seen as a crucial tool for driving economic growth, in particular for financing the country’s rapidly growing high-tech sectors.Although traditionally closed off to overseas investors, China’s financial markets have gradually been loosening restrictions over the past couple of decades. At the same time, reforms have sought to make it easier for Chinese companies to list on onshore stock exchanges, and new programs have been launched in attempts to lure some of China’s most coveted overseas-listed companies back to the country.

Python Academy from pl


Telegram Python Academy
FROM USA